{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "9d172651",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\ProgramData\\Anaconda3\\lib\\site-packages\\IPython\\core\\pylabtools.py:151: UserWarning: Glyph 24191 (\\N{CJK UNIFIED IDEOGRAPH-5E7F}) missing from current font.\n",
      "  fig.canvas.print_figure(bytes_io, **kw)\n",
      "C:\\ProgramData\\Anaconda3\\lib\\site-packages\\IPython\\core\\pylabtools.py:151: UserWarning: Glyph 21578 (\\N{CJK UNIFIED IDEOGRAPH-544A}) missing from current font.\n",
      "  fig.canvas.print_figure(bytes_io, **kw)\n",
      "C:\\ProgramData\\Anaconda3\\lib\\site-packages\\IPython\\core\\pylabtools.py:151: UserWarning: Glyph 20844 (\\N{CJK UNIFIED IDEOGRAPH-516C}) missing from current font.\n",
      "  fig.canvas.print_figure(bytes_io, **kw)\n",
      "C:\\ProgramData\\Anaconda3\\lib\\site-packages\\IPython\\core\\pylabtools.py:151: UserWarning: Glyph 21496 (\\N{CJK UNIFIED IDEOGRAPH-53F8}) missing from current font.\n",
      "  fig.canvas.print_figure(bytes_io, **kw)\n",
      "C:\\ProgramData\\Anaconda3\\lib\\site-packages\\IPython\\core\\pylabtools.py:151: UserWarning: Glyph 31574 (\\N{CJK UNIFIED IDEOGRAPH-7B56}) missing from current font.\n",
      "  fig.canvas.print_figure(bytes_io, **kw)\n",
      "C:\\ProgramData\\Anaconda3\\lib\\site-packages\\IPython\\core\\pylabtools.py:151: UserWarning: Glyph 21010 (\\N{CJK UNIFIED IDEOGRAPH-5212}) missing from current font.\n",
      "  fig.canvas.print_figure(bytes_io, **kw)\n",
      "C:\\ProgramData\\Anaconda3\\lib\\site-packages\\IPython\\core\\pylabtools.py:151: UserWarning: Glyph 25991 (\\N{CJK UNIFIED IDEOGRAPH-6587}) missing from current font.\n",
      "  fig.canvas.print_figure(bytes_io, **kw)\n",
      "C:\\ProgramData\\Anaconda3\\lib\\site-packages\\IPython\\core\\pylabtools.py:151: UserWarning: Glyph 26696 (\\N{CJK UNIFIED IDEOGRAPH-6848}) missing from current font.\n",
      "  fig.canvas.print_figure(bytes_io, **kw)\n",
      "C:\\ProgramData\\Anaconda3\\lib\\site-packages\\IPython\\core\\pylabtools.py:151: UserWarning: Glyph 34892 (\\N{CJK UNIFIED IDEOGRAPH-884C}) missing from current font.\n",
      "  fig.canvas.print_figure(bytes_io, **kw)\n",
      "C:\\ProgramData\\Anaconda3\\lib\\site-packages\\IPython\\core\\pylabtools.py:151: UserWarning: Glyph 38144 (\\N{CJK UNIFIED IDEOGRAPH-9500}) missing from current font.\n",
      "  fig.canvas.print_figure(bytes_io, **kw)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAEWCAYAAABIVsEJAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAYyElEQVR4nO3de7gddX3v8feHIBflJhIQEkKoRA/U08PBLahoqyI2ICW09QLeAC2Ro7RYLxSkp+X41Kq1p+CFI6XeoKJIvQBqFJGrF0ASRBQpEjkgMRGCiCKoEPj2j5ktK9u9s9eeZO+VZL9fz7OerPnNb+b3XbNX5rNmZl1SVUiSNFGbDLoASdKGyQCRJHVigEiSOjFAJEmdGCCSpE4MEElSJwaI+pakkuwx6DrWhST7J7klyS+THDZFY74iyVfGqiHJTkmuTHJfkv87FTVNJxvT83d9YYCIJJcn+YtJWO+Tk/xHkruT/DzJDUnelGTGuh5rxLgfS/IP43R7O/CBqtqqqs5fR2M+2O7870vyvSTvTLLtcJ+qOqeqXriGGhYCdwPbVNWb17amCdZ/VJKvj9NntedJkucm+VmSwye/Qq2PDBBNiiRPAq4B7gD+e1VtC7wEGAK2HmRtrd2AG7ssmGTTMWb9U1VtDcwEjgaeAXwjyeP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dV1d7t7Sk9vyb3IeAoHj36oKoeAm5r275JExrPA55E84uVWcP4v66qh3umR/0UcFUdC/wtsCtwfZInTOxhSv0xQKQJaH+/5RDgFUleC1wCvDjJjgBJtk+yW9v3Gpqd+MtpfjRs2JXAW9p/vwYcC1xfzddCXAP8UZId2gvlRwBXjFLKNcBzkzyhPQX2kuEZSZ5UVddU1d8Bd7c1SOuc34UlTVBV3ZNkPk0AvJHm1f5XkmxCc5rrDcDtbffzgL2r6mc9q/gacDJwVVXdn+TXbRtVtSLJScBlNEcji6rqglFqWNH+JvdVwArgOh49XfWeJPPa5S8BvrOuHrvUy+/CkiZRki8Ap1bVJYOuRVrXPIUlTYIk2yX5AfArw0MbK49AJEmdeAQiSerEAJEkdWKASJI6MUAkSZ0YIJKkTv4Lr5Pz0PW0h3IAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import requests\n",
    "from bs4 import BeautifulSoup\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "def get_soup(url, params=None, cookies=None):\n",
    "    headers = {\n",
    "        'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Mobile Safari/537.36 Edg/119.0.0.0'\n",
    "    }\n",
    "    response = requests.get(url, headers=headers, params=params, cookies=cookies)\n",
    "    response.raise_for_status()  # 如果请求失败会抛出异常\n",
    "    return BeautifulSoup(response.text, 'html.parser')\n",
    "\n",
    "def main():\n",
    "    url = 'https://www.liepin.com/zhaopin/?city=410&dq=410&pubTime=&currentPage=0&pageSize=40&key=%E5%B9%BF%E5%91%8A%E7%BB%8F%E7%90%86&suggestTag=&workYearCode=&compId=&compName=&compTag=&industry=&salary=&jobKind=&compScale=&compKind=&compStage=&eduLevel=&otherCity=&sfrom=search_job_pc&ckId=eq12n0el4yqynbc0o4lu5btv0f6rwsm9&scene=suggest&skId=eq12n0el4yqynbc0o4lu5btv0f6rwsm9&fkId=eq12n0el4yqynbc0o4lu5btv0f6rwsm9&suggest=[object%20Object]&suggestId=6cf8cc8dbaed5331a04570378393771c'\n",
    "    cookies = {\n",
    "        'cookie_name': '__uuid=1695198074804.68; __gc_id=d29e93953f694cba8829a2a82793325b; _ga=GA1.1.1963051593.1695199004; need_bind_tel=false; new_user=false; imId=b5e1273d5cb093f4ceec2a49177ea464; imId_0=b5e1273d5cb093f4ceec2a49177ea464; imClientId=b5e1273d5cb093f4c2b89f04a110357d; imClientId_0=b5e1273d5cb093f4c2b89f04a110357d; c_flag=a72838d40c64dd08f5c5140054978407; XSRF-TOKEN=vLw-GqefSWiArOH8kCCUww; __tlog=1701256535214.22%7C00000000%7C00000000%7C00000000%7C00000000; Hm_lvt_a2647413544f5a04f00da7eee0d5e200=1698838423,1700046606,1701256535; _ga_54YTJKWN86=GS1.1.1701256534.8.1.1701257219.0.0.0; __session_seq=4; __uv_seq=4; Hm_lpvt_a2647413544f5a04f00da7eee0d5e200=1701257220; __tlg_event_seq=10'  # 替换成实际的cookie键值对\n",
    "    }\n",
    "    keywords = ['4A广告公司', '广告策划', '广告文案', '行销策划']\n",
    "    keyword_counts = {}  # 用于存储关键词出现的次数\n",
    "\n",
    "    for keyword in keywords:\n",
    "        count = 0\n",
    "        for page in range(1, 3):  # 假设我们只抓取前两页的数据\n",
    "            params = {\n",
    "                'key': keyword,\n",
    "                'dqs': '010',  # 假设地区代码为010\n",
    "                'curPage': page\n",
    "            }\n",
    "            soup = get_soup(url, params, cookies)\n",
    "\n",
    "            job_list = soup.find_all('div', class_='job-info', text=lambda t: keyword in t)\n",
    "            count += len(job_list)\n",
    "\n",
    "        keyword_counts[keyword] = count\n",
    "\n",
    "    # 创建条形图\n",
    "    plt.bar(keyword_counts.keys(), keyword_counts.values())\n",
    "    plt.xlabel('Keywords')\n",
    "    plt.ylabel('Count')\n",
    "    plt.title('Job Count for Different Keywords')\n",
    "    plt.show()\n",
    "\n",
    "if __name__ == '__main__':\n",
    "    main()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d4f771c1",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
